package com.tao.switchdemo3;

import java.util.Scanner;

public class SwitchDemo2 {
    public static void main(String[] args) {
        String fruit;
        // 输入水果名字
        Scanner input = new Scanner(System.in);
        fruit = input.nextLine();
        // switch输出水果价格
        switch(fruit){
            case "苹果":
                System.out.println("苹果6块一斤");
                break;
            case "香蕉":
                System.out.println("香蕉3元一斤");
                break;
            case "榴莲":
                System.out.println("榴莲20元一斤");
                break;
            case "西瓜":
                System.out.println("西瓜0.8元一斤");
                break;
            default:
                System.out.println("输入数据有误");
                break;
        }
    }

}
